<?

//require_once(dirname(__FILE__) . '/../abstract/db.php');

class bf_db_pdo_sqlite3 extends bf_db_pdo {

	protected function default_options() {
		return array(
			'database' => 'database.sqlite',
			'log' => dirname(__FILE__) . '/../../../logs/db-pdo-sqlite3-' . date('Y-m-d') . '.log',
			'logging' => 1,
		);
	}

	protected function data_source_name() {
		return "sqlite:{$this->opts['database']}";
	}

	public function get_true() {
		return '1';
	}

	public function get_false() {
		return '0';
	}

	public function is_true($value) {
		return preg_match('/^(t|1)/i', "$value");
	}

	public function is_false($value) {
		return preg_match('/^(f|0)/i', "$value");
	}
}

?>